1. Field of the Invention
This invention relates generally to optical code readers and formats. More specifically, the invention is directed to an optical code reader having an adaptive threshold capability and to a corresponding optical code format that presets the threshold of the reader to a known value.
2. Statement of the Related Art
Optical code readers and optical codes are presently used in many applications wherein it is desirable to identify an item quickly and accurately by a selected code applied thereto. Examples include product and price identification in retail stores, stock identification in inventory applications, and sample or test result and corresponding patient identification in medical applications.
One common type of optical code reader presently in use generally comprises an optical source such as a light emitting diode (LED) that illuminates a code being scanned by the reader or being moved across a stationary reader, an optical detector such as a conventional photodiode or phototransistor that detects the light reflected by the code and converts it into an electrical analog signal, and a detector circuit (also called a discriminator or wave-shaping circuit) that converts the analog signal into digital pulses representative of the code.
A variety of black on white type code formats in which a black pattern is printed on a white or other suitably contrasting background are known in the art. Such code formats include, for example, circular codes and bar codes, such as the widely known and used universal product code (UPC), among others. Black on white codes encode digital data in the alternating black and white areas of the code and some, like the UPC, in the relative widths of the black and white areas. Such code formats also generally include white "quiet zones" which border the code-containing areas.
Known optical detector circuits typically convert the analog signal produced by scanning such a code into digital pulses corresponding to the code by comparing the signal to a threshold level and generating a pulse if the signal is above the threshold and no pulse if the signal is below the threshold, or vice versa depending on the logic employed. Typically, white code areas, having a high degree of light reflectivity, produce signals having relatively high positive peak values, whereas black areas, having a fairly low degree of reflectivity, produce signals having relatively high negative peak values compared to the threshold value.
It has long been known in the optical reader art that the analog signal generated by the optical detector tends to have large amplitude variations both from code to code and within the same code. The reasons for such variations are known to include improper or non-uniform printing of the code, dirt or other foreign substances adhered to the code, non-uniformity of the surface on which the code is printed, variations in distance between the code and the reader, and varying contrast between the code and the background on which it is printed, to name a few.
Such variations present significant problems in accurately detecting and converting the generated analog signal to corresponding digital pulses if a fixed threshold value is used. Accordingly, detector circuits having continuously adaptive thresholds have been developed. Many of such circuits are designed to adjust the threshold as a function of the difference between the values of successive positive and negative peaks which occur in the analog signal during black to white and white to black transitions in the code.
A problem with such adaptive threshold detector circuits is that in the absence of black to white or white to black transitions, the threshold signal tends to float to near the level of the analog signal generated by the optical detector. This situation renders the detector circuit extremely sensitive to even small negative-going excursions of the analog signal which can be readily caused by minor surface imperfections on the code or by vibrations of the optical detector, for example. When reading codes having quiet zones, such as the UPC, the detector circuit is particularly susceptible to read errors caused by dirt or other debris in the quiet zones. Such errors can have dire consequences in critical applications such as identifying medication or test results with a particular patient, for example. Accordingly, it is imperative to prevent such errors.
Thus, it is an object of the invention to provide an optical code reader system which overcomes the limitations and drawbacks identified with the prior art. Specifically, it is an object of the invention to provide an optical code reader system that accurately reads optical codes having error inducing characteristics such as those identified above which cause amplitude variations in the electrical signal representing the code. It is a further object to provide such a system that has an adaptively preset threshold value which further minimizes the occurrence of erroneous readings. It is a still further object to provide such a system wherein a specially designed optical code format cooperates with an optical code reader to adaptively preset the threshold value of the code reader detector circuit.